/*
 * 功能: 贝勒德事件(奖励地图)
 * From: 芬芬时尚潮流
 */

var status = -1;

function action(mode, type, selection) {
	var mapid = ms.getMapId().toString();
	var name = mapid.slice(6, 8);
	ms.showMapEffect("giantBoss/enter/" + name);
	var em = ms.getEventManager("BeidlerPQ");
	var eim = ms.getEventInstance();
	if (em != null && eim != null) {
		if (eim.getProperty("reward").equals("0")) {
			eim.setProperty("reward", "1");
			var state = parseInt(eim.getProperty("Core"));
			ms.forceTrigger(ms.getMapId(), 8630000 + state);
		}
		ms.getPlayer().gaintBossMap();
	}
	ms.dispose();
}
